<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <form action="" method="POST" id="rowForm">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
                <tr><td><?= translate('AREA_ID') ?>:</td>
                    <td><input type="text" name="row[svrid]" id="svrid" size="25" value="<?= $svrid ?>" />
                    </td>
                </tr>
                <tr>
                    <td><?= translate('AREA_NAME1') ?>:</td>
                    <td><input type="text" name="row[svrname1]" id="svrname1" size="50"  value="<?= $svrname1 ?>" />
                    </td>
                </tr>
                <tr>
                    <td><?= translate('AREA_NAME2') ?>:</td>
                    <td><input type="text" name="row[svrname2]" id="svrname2" size="50"  value="<?= $svrname2 ?>" />
                    </td>
                </tr>
                <tr>
                    <td><?= translate('AREA_NAME3') ?>:</td>
                    <td><input type="text" name="row[svrname3]" id="svrname3" size="50"  value="<?= $svrname3 ?>" />
                    </td>
                </tr>
                <tr>
                    <td><?= translate('AREA_HOST') ?>:</td>
                    <td><input type="text" name="row[svroutaddr]" id="svroutaddr" size="50"  value="<?= $svroutaddr ?>" />
                    </td>
                </tr>
                <tr>
                    <td><?= translate('AREA_OPENTIME') ?>:</td>
                    <td><input type="text" name="row[svropentime]" id="svropentime" size="25"  value="<?= $svropentime ?>"  class="datepicker" showtime="true" /></td>
                </tr>
                <tr>
                    <td><?= translate('AREA_CURRENTTIME') ?>:</td>
                    <td><input type="datetime" name="row[svrcurtime]" id="svrcurtime" size="25" value="<?= $svrcurtime ?>" class="datepicker" showtime="true" /></td>
                </tr>
                <tr>
                    <td><?= translate('STATUS') ?>:</td>
                    <td>
                        <?php foreach ($statelist as $m => $n) { ?>
                            <input type="radio" name="row[state]" id="state" value="<?= $m ?>" id="s<?= $m ?>" <?= checkchecked('hide', $m) ?> /><label for="s<?= $m ?>"><?= $n ?></label> &nbsp;
                        <?php } ?>
                    </td>
                </tr>
                <tr>
                    <td><?= translate('SVR_MODE') ?>:</td>
                    <td>
                        <?php foreach ($modelist as $m => $n) { ?>
                            <input type="radio" name="row[smode]" id="smode" value="<?= $m ?>" id="s<?= $m ?>" <?= checkchecked('hide', $m) ?> /><label for="s<?= $m ?>"><?= $n ?></label> &nbsp;
                        <?php } ?>
                    </td>
                </tr>

                <tr><td></td><td><input type="submit" value="<?= translate('SUBMIT') ?>" id="submit"/> <input type="reset" value="<?= translate('RESET') ?>" id="reset"/></td></tr>
            </table>
        </form>
        <script type="text/javascript">
            SG.init("core.form", function() {
                $.formValidator.initConfig({formid: "#rowForm", submitonce: true});
                $("#id").formValidator({empty: false, onshow: '<?= translate('C_ONLY_ONE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#father_id").formValidator({empty: true, onshow: '<?= translate('AREA_FORM_INPUT_FATHER_ID') ?>'});
                $("#name").formValidator({empty: false, onshow: '<?= translate('C_NOT_EMPTY') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#players").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#weigh").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#odds").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#version").formValidator({empty: true, onshow: '<?= translate('AREA_FORM_INPUT_VERSION') ?>'});
                $("#url").formValidator({empty: false, onshow: '<?= translate('C_NOT_EMPTY') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#host").formValidator({empty: false, onshow: '<?= translate('AREA_FORM_INPUT_HOST') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#opentime").formValidator({empty: false, onshow: '<?= translate('AREA_FORM_INPUT_OPENTIME') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
            });
        </script>
    </body>
</html>